        </div>	<!-- end row -->
    </div>	<!-- end container -->
</div> <!-- end content_wp -->
<!------------------------- Cac chinh sách --------------------------->
<div class="container">
<div class="box_content cacchinhsach_wp" style="margin-top:15px;">
	<div class="title_head">
		<h3><i class="fa fa-dot-circle-o"></i> Các chính sách</h3>
	</div>
    <?php $info = get_chinhsach();if(!empty($info)){foreach($info as $item){?>
	<div class="cacchinhsach_cl">
		<div class="cacchinhsach">
			<div class="title_chinhsach">
				<a href="<?php echo site_url($item->slug)?>"><span><?php echo $item->icon ?> <?php echo $item->title?></span></a>
			</div>
            <div class="chinhsach_text">
            	<p><?php echo $item->description?></p>
                <p><i class="fa fa-angle-double-right"></i> <a href="<?php echo site_url($item->slug)?>">Xem thêm chi tiết tại đây</a></p>
            </div>
		</div>
	</div>
    <?php }}?>
    <div class="clear"></div>
</div>
</div>
<!------------------------- lien he footer --------------------------->
<div class="lienhe_footer_wp">
	<div class="container">
    	<div class="row">
        <div class="lienhe_footer">
        	<div class="col-xs-12 col-sm-5 col-md-5">
            	<div class="contact_footer_info">
                	<p><img src="<?php echo base_url(ASSETPATH.'images/icon_lienhe.png')?>"></p>
                    <p>Xin vui lòng liên hệ, đễ được hỗ trợ hoặc thông tin</p>
                </div>
            </div>
            <div class="col-xs-12 col-sm-4 col-md-4">
            	<div class="contact_footer_info_b">
                	<div class="opentime footer_opentime">
                        <?php echo $this->config->item('tel');// echo $this->settings['tel']?>
                    </div>
                </div>
            </div>
            <div class="col-xs-12 col-sm-3 col-md-3">
            	<div class="contact_footer_info_c">
                	<p style="text-align:center;font-weight:bold"> Đăng ký nhận tin</p>
                	<span><img src="<?php echo base_url(ASSETPATH.'images/icon_lathu.png')?>"></span>
                    <input style="width:60%" class="footer_email" name="" onkeypress="checkEmail(event,$(this))" type="text" placeholder="Email">
                    <button onclick="Submit_email()" id="btn_send_mail" value="send">Gửi</button> 
                </div>
            </div>
            <div class="clear"></div>
        </div>
        </div>
    </div>
</div>
<!------------------------- footer --------------------------->
<div class="footer_wp_1">
<div class="container">
	<div class="row">
    	<div class="col-xs-12 col-sm-6 col-md-7">
        	<div class="footer_left">
            	<?php echo $this->config->item('hn_address');//echo $this->settings['hn_address']?>
            </div>
        </div>
        <div class="col-xs-12 col-sm-6 col-md-5">
        	<div class="footer_right">
            	<?php echo $this->config->item('hcm_address');// echo $this->settings['hcm_address']?>
            </div>
        </div>
    </div>
</div>
</div>
<div class="footer_wp_1 footer_wp_2">
<div class="container">
	<div class="copyright_wp">
    	<span>Copyright 2014  Plus Mainichi Japan Concept Shop. All right reservered.</span>
    </div>
</div>
</div>
<?php 
/* close popup $html_template_popup =  dialog_login(); 
echo $html_template_popup;
*/
if($this->router->class == "cart" and $this->router->method == "product"){ if(empty($html_template_popup)){?>			
    <link href="<?php echo base_url("gocart/themes/default/assets/css/chosen.css")?>" type="text/css" rel="stylesheet" />
    <link href="<?php echo base_url("gocart/themes/default/assets/css/popup.css")?>" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="<?php echo base_url("gocart/themes/default/assets/js/chosen.js")?>"></script>
    <script type="text/javascript" src="<?php echo base_url("gocart/themes/default/assets/js/popupoverlay.js")?>"></script>
<?php }?>
<link href="<?php echo base_url("gocart/themes/default/assets/css/jquery-ui.css")?>" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo base_url("gocart/themes/default/assets/js/jquery-ui.js")?>"></script>
<style type="text/css">
	#popup_comment{background:#FFF;display:none}
	#popup_comment label{width:90px}
	.score{font-size:20px}
	.score i{cursor:pointer;width:32px;margin-left:-5px}
	#popup_comment textarea{height:70px}
	#popup_comment input,#popup_comment select{height:30px}
	.error{background: #f2dede;color: #b94a48;text-align: center;padding-bottom: 3px;}
	.loading{text-align: center;padding-bottom: 50px;padding-top: 50px;display:none;padding:20px}
</style>
<div id="popup_comment">
	<a id="close_comment"><img class="close_popup" src="<?php echo base_url("gocart/themes/default/assets/images/close.png")?>"></a>
	<p class="register_title"> Bình luận <strong><?php echo $product->name?></strong></p>
    <div class="loading"><img src="<?php echo base_url("assets/images/ajax-loader.gif")?>"/></div>
    <div class="register_content">
        <form id="form_comment" action="" method="post">
        	<div class="error_m"></div>
            <?php if(!empty($this->customer)){
				?>
            	<p><input type="hidden"  value="<?php echo $this->customer["email"]?>" name="email" /></p>
            	<p><input type="hidden"  value="<?php echo $this->customer["fullname"]?>" name="fullname"  /></p>
                <p><input type="hidden"  value="<?php echo $this->customer["birth"]?>" name="birth"/></p>
            <?php }else{?>
            <p><input type="text"  value="" name="email" placeholder="Email (*)"/></p>
            <p><input type="text" value="" name="fullname" placeholder="Họ và tên (*)" /></p>
            <p><select style="width:100%" name="gender"><option value="">-- Chọn giới tính (*) --</option><option value="2">Nam</option><option value="1">Nữ </option></select></p>
            <p><input type="text" value="" name="birth"  id="date_birth" placeholder="Ngày sinh (*)" /></p>
            <p><select style="width:100%" name="city"><option value="">-- Tỉnh/Tp --</option><?php foreach($city as $item){$selected = ($item->id==3780)?"selected":"";echo '<option '.$selected.' value="'.$item->id.'">'.$item->name.'</option>';}?></select></p>
            <p><select  style="width:100%" name="zone_area"><option value="">-- Quận/Huyện --</option><?php foreach($zone_area as $item){echo '<option value="'.$item->id.'">'.$item->code.'</option>';}?></select></p>
            <?php }?>
            <div style="margin-bottom:10px;">
            	<label style="float:left;width:65px"> Điểm số</label>
                <div class="score" style="width:180px;float:left;margin-top:-7px">
                    <?php for($i=0;$i<5;$i++){?>
                        <i class="fa <?php echo ($i==4)?"fa-star active_star":"fa-star-o"?>  star_e<?php echo $i?>"></i>
                    <?php }?>
                </div>
                <div class="clear"></div>
                <input value="5" name="score_star" type="hidden" />
            </div>
            <p style="margin-top:10px;clear:both"><textarea placeholder="Đánh giá" style="width:100%" name="content"></textarea></p>
            <p id="codecmt"></p>
            <p><input type="text"  name="code" value="" placeholder="Vui lòng nhập mã xác nhận theo hình trên"/></p>
            <p style="text-align:center"><button style="width:100%;" class="btn btn-default" style="width:100px"> Gửi bình luận </button></p>
        </form>
    </div>
</div>
<script language="javascript">
	function active_start($index,$onmousemove){
		if($index != 0  ){
			$index -= 1;
			if($index == 0 && $onmousemove != 1){
				$("#popup_comment .fa").removeClass("active_star");
				$("#popup_comment .fa").eq(0).addClass("active_star");
			}
			$("input[name='score_star']").val(1);
		}else{
			$("#popup_comment .fa").removeClass("fa-star").addClass("fa-star-o");
			$index = $("#popup_comment .active_star").index();
			$("input[name='score_star']").val($index+1);
		}
		for(var $i=0;$i<=4;$i++){
			if($i <= $index){
				$(".star_e"+$i).removeClass("fa-star-o").addClass("fa-star");	
			}
			else
				$(".star_e"+$i).removeClass("fa-star").addClass("fa-star-o");	
		}	
	}
	$("#popup_comment .fa").mouseover(function(){
		$index = $("#popup_comment .fa").index(this);	
		active_start($index+1,1);
	}).mouseout(function(){
		active_start(0,1);
	});
	$("#popup_comment .fa").click(function(){
		$("#popup_comment .fa").removeClass("active_star");
		$(this).addClass("active_star");
		active_start(0);
	});
	function validEmail(v) {
		var r = new RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?");
		return (v.match(r) == null) ? false : true;
	}
	$(document).ready(function(){
		$(".btn_comment").click(function(){
			$('#popup_comment').popup({autoopen:true, blur:false});
			$(".register_content").css("display","block");
			$(".loading").css("display","none");
			$(".loading").html("<img src='<?php echo base_url("assets/images/ajax-loader.gif")?>'/>");
			<?php /* if(empty($this->customer)){?>
				$("#popup_comment input,#popup_comment textarea").val("");
			<?php }else{?>
				$("#popup_comment input[name='code'],#popup_comment textarea").val("");
			<?php }*/?>
			$("#popup_comment textarea").val("");
			$("#popup_comment .error_m").html("");
			active_start(5);
			$.ajax({
				url:"<?php echo site_url("cart/get_capcha")?>",
				success:function(result){
					$("#codecmt").html(result)	
				}
			})
		});
		$("#close_comment").click(function(){
			$('#popup_comment').popup("hide");							   
		});
		$("#form_comment").submit(function(){
			var email 	 = $("#popup_comment input[name='email']").val();
			var fullname = $("#popup_comment input[name='fullname']").val();
			var birth	 = $("#popup_comment input[name='birth']").val();
			var content	 = $("#popup_comment textarea[name='content']").val();
			var $html_error = "";
			if(fullname == "" || fullname == null){
				$html_error += "<p class='error'> Vui lòng nhập <strong>họ và tên</strong> </p>";
			}
			if(email == null || email == "")
				$html_error += "<p class='error'>Vui lòng nhập <strong>email</strong></p>";
			else{
				if(!validEmail(email)) {
					$html_error += "<p class='error'>Định dạng email không đúng</p>";
				}
			}
			if($html_error != ""){
				$(".error_m").html($html_error);
				
			}else{
				$.ajax({
					url:"<?php echo site_url("cart/add_comment/".$product->id)?>",
					type:"POST",
					data:$("#form_comment").serializeArray(),
					beforeSend:function(){
						$(".loading").css("display","block");
						$(".register_content").css("display","none");
					},
					success:function(result){
						result = $.parseJSON(result);
						if(result.error == 1){
							$(".loading").css("display","none");
							$(".register_content").css("display","block");							
							$(".error_m").html(result.mess);
						}else{
							$(".loading").html(result.mess);
							var $html = "";
							for(var $i=1;$i<=result.score;$i++){
								$html += "<i class='fa fa-star'></i>";	
							}
							$(".ul_cmt").prepend("<li><p><span  class='name_cmt'>"+result.name+"</span> <span style='font-style:italic'>đánh giá lúc "+result.time+"</span></p><p><b> Đánh giá: </b>"+$html+"</p><p>"+result.content+"</p></li>");
						}
					}
				});	
			}
			return false;
		});
		$("#date_birth").datepicker({
			dateFormat:"dd/mm/yy",	
			changeYear: true,
			changeMonth:true,
			monthNamesShort:[1,2,3,4,5,6,7,8,9,10,11,12],
			yearRange:"1950:-10",
			defaultDate:'01/01/1950',
		});
		$("select[name='city']").change(function(){
			var city_id = $("select[name='city'] option:selected").val();	
			$.get("<?php echo site_url("cart/get_zone_area")?>/"+city_id,function(result){
				$("select[name='zone_area']").html(result);
			});
		});
	});
</script>
<?php }?>
<!-- UItoTop plugin -->
<?php echo theme_js('jquery.ui.totop.js', true);?>
<!-- Starting the plugin -->
<script type="text/javascript">
		$(document).ready(function() {
			/*
			var defaults = {
	  			containerID: 'toTop', // fading element id
				containerHoverID: 'toTopHover', // fading element hover id
				scrollSpeed: 1200,
				easingType: 'linear' 
	 		};
			*/
			$().UItoTop({ easingType: 'easeOutQuart' });
		});
</script>
<?php echo theme_js('jquery.tmpl.min.js', true);?>
<?php echo theme_js('jquery.easing.1.3.js', true);?>
<?php echo theme_js('jquery.elastislide.js', true);?>
<?php echo theme_js('gallery.js', true);?>

<script type="text/javascript">
/* mouse mouve show */
$(function(){doTimer();})	
var t;var timer_is_on=0;
function timedCount(){
	$('.rg-image-nav-next').click(); t=setTimeout("timedCount()",5000);
}
function doTimer(){
	if (!timer_is_on){
	  timer_is_on=1; timedCount(5000);
	 }
}
function stopCount(){
	clearTimeout(t); timer_is_on=0;
}	
</script>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 983101597;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
	<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/983101597/?value=0&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
<script type='text/javascript'>window._sbzq||function(e){e._sbzq=[];var t=e._sbzq;t.push(["_setAccount",15529]);var n=e.location.protocol=="https:"?"https:":"http:";var r=document.createElement("script");r.type="text/javascript";r.async=true;r.src=n+"//static.subiz.com/public/js/loader.js";var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i)}(window);</script>

<!--  facebook retargeting -->
<script>(function() {
  var _fbq = window._fbq || (window._fbq = []);
  if (!_fbq.loaded) {
    var fbds = document.createElement('script');
    fbds.async = true;
    fbds.src = '//connect.facebook.net/en_US/fbds.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(fbds, s);
    _fbq.loaded = true;
  }
  _fbq.push(['addPixelId', '915760468456941']);
})();
window._fbq = window._fbq || [];
window._fbq.push(['track', 'PixelInitialized', {}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?id=915760468456941&amp;ev=PixelInitialized" /></noscript>
</body>
</html>